﻿@{
    Layout = null;
    var StartDate = @DateTimeHelper.FormatDate(DateTime.Now.Date.AddDays(-10), "yyyy-MM-dd");
    //int total = Model.TotalCount;
}
<link href="~/www/css/style.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<div class="djcCen">
    <div class="djcCenSear">
        <form id="form1">
            <div class="djcCSLogo"><span>待稽查车辆</span></div>
            <input type="text" id="CarNO" name="CarNO" value="请输入车牌号" class="djcCSTxt" />
            <input id="startDate" name="startDate" class="Wdate" value="@StartDate" onFocus="WdatePicker({lang:'zh-cn'})" />
            <button class="djcCSBut" type="button" onclick="return SearchData()">
                <i class="fa fa-search"></i>搜索
            </button>
        </form>
    </div>
    @*<div id="syncCarExitStation" class="uitable" data-url="@Url.Action("Grid","MobileSyncCarExitStation")">
            @Html.Action("Grid", "MobileSyncCarExitStation")
        </div>*@
</div>
<script type="text/javascript">
    function SearchData() {
        var BusCode = $("#CarNO").val();//车牌号
        alert(BusCode);
        var starDate = $("#startDate").val();//查询时间
        if (BusCode == null || BusCode.length <= 4) {
            layer.open({ content: "请输入最少4位车牌号！", btn: "确定" });
            return false;
        } if (starDate == null) {
            layer.open({ content: "请输入查询日期！", btn: "确定" });
            return false;
        }
        $.ajax({
            type: "POST",
            url: "/M_SystemReg/Grid",
            data: { CarNO: BusCode, startDate: starDate},
            datatype: "json",
            success: function (result) {
                if (data.success) {
                    alert("successs");
                }
                else
                {
                    alert("fail");
                }
            }
        });
    }
</script>